<?php

class m_login extends CI_Model {

	function validate_user($email='', $pass='')
	{
		$this->db->where('email',$email);
		$this->db->where('pass',$pass);
		$this->db->where('aktif',1);
		$res=$this->db->get('rumahsakit');
		if ($res->num_rows()>0) {
			return TRUE;
		} else {
			return FALSE;
		}
		
	}
	
	function getrsidbyemail($email='')
	{
		$this->db->where('email', $email);
		$res= $this->db->get('rumahsakit')->result_array();
		//print_r($res);exit(); 
		return $res[0]['rsid'];
	}

}
?>